<template>
    <div>
    </div>
</template>


<script setup>
import { customRef, isProxy, isReactive, isReadonly, reactive, readonly, ref, shallowReactive, shallowReadonly } from 'vue';

// isReactive()判断是否为reactive返回布尔值
const state=reactive({count:10})
console.log(isReactive(state));

const shallowState=shallowReactive({count:10,sum:{num:20}})
console.log(isReactive(shallowState));
console.log(isReactive(shallowState.sum));
console.log(shallowState.sum);

// isProxy()



const reactiveObj=reactive({count:10})
console.log(isProxy(reactiveObj));

const raeadonlyObj=readonly({count:10})
console.log(raeadonlyObj);
console.log(isProxy(raeadonlyObj));

const shallowReadonlyObj=shallowReadonly({count:10})
console.log(isProxy(shallowReadonlyObj));

const shallowReactiveObj=shallowReactive({count:10,sum:{num:20}})
console.log(isProxy(shallowReactiveObj));

// isReadonly()
console.log(isReadonly(raeadonlyObj));
console.log(isReadonly(shallowReadonlyObj));
console.log(isReadonly(state));

const a=ref(10)
console.log(isProxy(a));
const b=ref({count:10})
console.log(b);



console.log(isProxy(b.value));




</script>



<style scoped></style>